package org.dromara.business.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.business.domain.RebateRecord;
import org.dromara.business.domain.bo.RebateRecordBo;
import org.dromara.business.domain.vo.RebateRecordVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 返利记录Mapper接口
 *
 * @author Eric
 * @date 2025-09-05
 */
@Mapper
public interface RebateRecordMapper extends BaseMapperPlus<RebateRecord, RebateRecordVo> {

    Page<RebateRecordVo> queryPageList(@Param("page") Page<Object> page, @Param("bo") RebateRecordBo bo);

    int checkRewardExists(@Param("stakingId") Long stakingId, @Param("rewardType") Integer rewardType, @Param("date") LocalDateTime date);
}
